package com.example.casper.Experiment2024.Database;

import androidx.room.Entity;
import androidx.room.ColumnInfo;
import androidx.room.PrimaryKey;

@Entity(tableName = "punch_record")  // 如果表名不是默认的类名，可以在这里指定
public class PunchRecord {
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")  // 如果列名与字段名相同，可以省略此注解
    private int id;

    @ColumnInfo(name = "latitude")
    private double latitude;

    @ColumnInfo(name = "longitude")
    private double longitude;

    @ColumnInfo(name = "city")
    private String city;

    @ColumnInfo(name = "description")
    private String description;

    @ColumnInfo(name = "photo_path")  // 如果列名与字段名不同，需要指定列名
    private String photoPath;

    @ColumnInfo(name = "timestamp")
    private long timestamp;

    // Getter 和 Setter 方法保持不变
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPhotoPath() {
        return photoPath;
    }

    public void setPhotoPath(String photoPath) {
        this.photoPath = photoPath;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
}